package com.AdvancedDemos.单元测试_反射_注解.反射;

public class Person {

    public String sex;
    int age;
    private String name;

    public Person() {
    }

    private Person(String name) {
        this.name = name;
    }

    Person(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }

    public void eat() {
        System.out.println("吃了");
    }

//    public void eat(int a) {
//        System.out.println("吃了");
//    }

    void eat2() {
        System.out.println("吃了2");
    }

    private void eat3() {
        System.out.println("吃了3");
    }

    public void sleep(int time) {
        System.out.println("睡了" + time + "小时");
    }

    public void sleep2(int time, String person) {
        System.out.println("跟" + person + "睡了" + time + "个小时");
    }

    private int getSum(int a, int b) {
        return a + b;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}


